import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
import type { ResultType } from "@/utils/http/types";

/** 获取系统管理-菜单管理列表 */
export const getMenuList = (data?: object) => {
  return http.request<ResultType>("get", baseUrlApi("/menu/get_menu_list"), {
    data
  });
};

export const setMenuData = (data?: object) => {
  return http.request<ResultType>("post", baseUrlApi("/menu/save_data"), {
    data
  });
};

/** 获取角色管理-权限-菜单权限 */
export const getRoleMenu = (data?: object) => {
  return http.request<ResultType>("get", baseUrlApi("/menu/get_role_menu"), {
    params: data
  });
};
